<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>document</title>
	<script type="text/javascript">
	var data = {
		person : [['刘备',26,'双股剑'],['张飞',23,'丈八点钢矛'],['关羽',25,'青龙偃月刀']],
		age : [22,25,28]
	}
	var arr99 = ['张飞','关羽','刘备'];
	var array = [];
	function sortNumber(a,b){
		return b - a
	}
//去重函数
	function quchong(arr){
	  var array = [];
	  for (var i = 0; i < arr.length; i++) {
	     if(array.indexOf(arr[i]) == -1){
	      array.push(arr[i]);
	     }
	  }
	  return array;
	}
//字符串中的排序函数
	function sortd(arr){
		var arr1 = [];
		var arr2 = [];
		for (var i = 0; i < arr.length; i++) {
			if(arr[i] <= '9' && arr[i] >= '0' || typeof arr[i] == 'number'){
				arr1.push(arr[i])
			}else{
				arr2.push(arr[i])
			}
		};
		arr1 = arr1.sort(sortNumber);
		arr = arr1.concat(arr2);
		return arr;
	}
	function way(){
		for (var i = 0; i < arguments.length; i++) {
			var a = arguments[i];
			if(typeof a == 'string'){
				var arr = function(a){
					var arr = a.split('');
					sortd(arr);
					return arr;
				}
				array = array.concat(arr(a));
			 }else if(typeof a == 'object'){
			 	var arr1 = [];
				for (key in a) {
					way(a[key]);
				};
			}else{
				var arr2 = [];
				arr2.push(a)
				array = array.concat(arr2);
			}
		}
		return array;
	}
	way(data,'你好123',18,56,'ok',true,false,0)
	array1 = quchong(sortd(array));
	alert(array1)
	</script>
</head>
<body>
	
</body>
</html>